<?php
include("include/config.inc.php");
$i=0;
$contrctAjArray = array();
$selContractNoQry = "SELECT userId,contractId,contractNo
                            FROM contract
                           WHERE userId = ".$_REQUEST['userId']."
                        GROUP BY contractNo";
$selContractNoQryRes = mysql_query($selContractNoQry);
while($conAjRow = mysql_fetch_array($selContractNoQryRes))
{
  $contrctAjArray['contractId'][$i]  = $conAjRow['contractId'];
  $contrctAjArray['contractNo'][$i]  = $conAjRow['contractNo'];
  $i++;
}

include("bottom.php");
$smarty->assign("contrctAjArray",$contrctAjArray);
$smarty->display("uploadPicGetCont.tpl");
?>